﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Medianamik.Globalization;

namespace Medianamik.Core
{
    public class PropertyValidationExpression
    {
        private readonly Guid _uniqueId;

        public PropertyValidationExpression(Guid uniqueId, Regex expression)
        {
            _uniqueId = uniqueId;
            Expression = expression;
        }

        public Regex Expression { get; set; }

        public string LocalizedName
        {
            get { return Translator.Translate("TypeManagement", _uniqueId + "_FriendlyValidationExpression"); }
        }

        public string Pattern
        {
            get { return Expression.ToString(); }
        }
    }
}
